function Form_OnSubmit(form) { // if (temp = document.activeElement) // temp.blur(); var tohide = form.getElementsByTagName('input'); for (i = 0; i < tohide.length; i++) { // tohide[i].blur(); tempitem = form[tohide[i].name + '_name']; if (tempitem && form[tohide[i].name]) tempitem.disabled = true; } } function Checkbox_OnClick(checkbox, image, checked, normal) { if (String(image.src).substr(String(image.src).length - String(checked).length) != checked) { checkbox.disabled = false; image.src = checked; } else { checkbox.disabled = true; image.src = normal; } } function Radio_OnClick(form, radio, image, checked, normal) { if (temp = form.getElementsByTagName('img')) { for (i = 0; i < temp.length; i++) { tempname = String('radioimage_' + radio.name + '_'); if (String(temp[i].id).substr(0, tempname.length) == tempname) temp[i].src = normal; } } radio.value = String(image.id).substr(tempname.length); image.src = checked; } function DropDown_InitAll() { if ((bodies = document.documentElement.getElementsByTagName('body')) && bodies.length) { bodies[0].onclick = DropDown_HideAll; } } function DropDown_HideAll() { dropdowns = document.getElementsByTagName('div'); for (i = 0; i < dropdowns.length; i++) { if (String(dropdowns[i].id).substr(0, 9) == 'dropdown_') dropdowns[i].style.display = 'none'; } } function DropDown_DropDown(dropdown) { if (temp = document.getElementById('dropdown_' + dropdown.name)) { if (temp.style.display == 'none') DropDown_Show(dropdown); else temp.style.display='none'; } } function DropDown_Show(dropdown) { DropDown_HideAll(); if (temp = document.getElementById('dropdown_' + dropdown.name)) { temp.style.display = ''; if (temp.childNodes[0].clientHeight < temp.clientHeight) { temp.style.height = temp.childNodes[0].clientHeight + 'px'; temp.childNodes[0].style.width = temp.clientWidth + 'px'; } } } function DropDown_OnMouseOver(dropdown, value, option) { option.className = 'hover'; } function DropDown_OnMouseOut(dropdown, value, option) { if (dropdown.value != value) option.className = ''; else option.className = 'selected'; } function DropDown_OnClick(dropdown, value, option) { if (temp = document.getElementById('dropdown_' + dropdown.name).getElementsByTagName('td')) { for (i = 0; i < temp.length; i++) temp[i].className = ''; option.className = 'selected'; dropdown.value = value; dropdown.form[dropdown.name + '_name'].value = option.childNodes[0].nodeValue; document.getElementById('dropdown_' + dropdown.name).style.display = 'none'; } } function DropDown_OnChange(dropdown) { if (temp = dropdown.form[dropdown.name + '_name']) { dropdown.value = temp.value; } } function DropDown_ChangeOptions(dropdown, values, descriptions) { if (temp = document.getElementById('dropdown_' + dropdown.name)) { options = ''; for (i = 0; i < values.length; i++) { options += "'; } options += '
" + descriptions[i] + '
'; temp.innerHTML = options; dropdown.value = values[0]; dropdown.form[dropdown.name + '_name'].value = descriptions[0]; } }